package com.DSya.service.impl;

import com.DSya.entity.Book;
import com.DSya.mapper.BookMapper;
import com.DSya.service.BookService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 图书表 服务实现类
 * </p>
 *
 * @author DSya
 * @since 2025-03-02
 */
@Service
public class BookServiceImpl extends ServiceImpl<BookMapper, Book> implements BookService {


    @Autowired
    private BookMapper bookMapper;


    @Override
    public List<Book> selectBook(){
        LambdaQueryWrapper<Book> wrapper = new LambdaQueryWrapper<Book>();

        wrapper.gt(Book::getId, 0);
        wrapper.lt(Book::getPrice,100);

        return bookMapper.selectList(wrapper);
    }

}
